CC = cc
OBJ=ptyclient.o ptyserver.o base64.o
CFLAGS=-g -Wall

all: ptyclient ptyserver

ptyclient: ptyclient.o base64.o
	$(CC) $(CFLAGS) -o $@ $< base64.o

ptyserver: ptyserver.o base64.o
	$(CC) $(CFLAGS) -o $@ $< base64.o -lutil

ptyclient.o: ptyclient.c
	$(CC) $(CFLAGS) -c $<

ptyserver.o: ptyserver.c
	$(CC) $(CFLAGS) -c $<

base64.o: base64.c
	$(CC) $(CFLAGS) -c $<

clean:
	rm -f *~ ${OBJ} ptyclient ptyserver